// @import "~cube-ui/src/common/stylus/mixin.styl"

/*~是相对路径，可以相对node_modules路径下*/

border-1px($color)
    position: relative
    &:after
        display: block
        position: absolute
        left: 0
        bottom: 0
        width: 100%
        border-top: 1px solid $color
        content: ' '

border-top-1px($color)
    position: relative
    &:before
        display: block
        position: absolute
        left: 0
        bottom: 0
        width: 100%
        border-top: 1px solid $color
        content: ' '

border-right-1px($color)
    border-right: 1px solid $color
    @media (-webkit-min-device-pixel-ratio: 1.5),(min-device-pixel-ratio: 1.5)
        border-right: 0.7px solid $color
    @media (-webkit-min-device-pixel-ratio: 2),(min-device-pixel-ratio: 2)
        border-right: 0.5px solid $color

border-all-1px($color)
    position: relative
    &:after
        display: block
        position: absolute
        left: 0
        bottom: 0
        width: 100%
        height: 100%
        border: 1px solid $color
        content: ' '
        @media (-webkit-min-device-pixel-ratio: 1.5),(min-device-pixel-ratio: 1.5)
            border: 0.7px solid $color
        @media (-webkit-min-device-pixel-ratio: 2),(min-device-pixel-ratio: 2)
            border: 0.5px solid $color

border-none()
    &:after
        display: none

bg-image($url)
    background-image: url($url+"@2x.png")
    @media (-webkit-min-device-pixel-ratio: 3),(min-device-pixel-ratio: 3)
        background-image:  url($url+"@3x.png") 
